* xfns.c (Fx_window_property): Simplify a bit,
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 19 Apr 2011 06:34:43 +0000 (23:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 19 Apr 2011 06:34:43 +0000 (23:34 -0700)
to make a bit faster and to avoid GCC 4.6.0 warning.
* xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.

src/ChangeLog
src/xfns.c
src/xselect.c

index c44f9a0a6f020fe7ba2f4a6a1620eed813201220..62248654b92a937b769358b198ed58e8d20f08e2 100644 (file)
@@ -1,5 +1,9 @@
 2011-04-19  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * xfns.c (Fx_window_property): Simplify a bit,
+       to make a bit faster and to avoid GCC 4.6.0 warning.
+       * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
+
        * fns.c (internal_equal): Don't assume size_t fits in int.
 
        * alloc.c (compact_small_strings): Tighten assertion a little.
index 7a5751506871d2b5592523f4a422a135272f0aa3..f3dc493ff8514d90dfd7afd39f876753e684e6f6 100644 (file)
@@ -4352,7 +4352,7 @@ no value of TYPE (always string in the MS Windows case).  */)
              property and those are indeed in 32 bit quantities if format is
              32.  */
 
-          if (actual_format == 32 && actual_format < BITS_PER_LONG)
+          if (32 < BITS_PER_LONG && actual_format == 32)
             {
               unsigned long i;
               int  *idata = (int *) tmp_data;
index edf002264042c0442075a48dd016aaaba2f1d874..1141f2c6b6879794801b70d46d78b815a86c11d3 100644 (file)
@@ -1477,7 +1477,7 @@ x_get_window_property (Display *display, Window window, Atom property,
          The bytes and offsets passed to XGetWindowProperty refers to the
          property and those are indeed in 32 bit quantities if format is 32.  */
 
-      if (*actual_format_ret == 32 && *actual_format_ret < BITS_PER_LONG)
+      if (32 < BITS_PER_LONG && *actual_format_ret == 32)
         {
           unsigned long i;
           int  *idata = (int *) ((*data_ret) + offset);
@@ -2432,7 +2432,7 @@ x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_disp
      function expects them to be of size int (i.e. 32).  So to be able to
      use that function, put the data in the form it expects if format is 32. */
 
-  if (event->format == 32 && event->format < BITS_PER_LONG)
+  if (32 < BITS_PER_LONG && event->format == 32)
     {
       for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */
         idata[i] = (int) event->data.l[i];